//商品名称
var spm1 = 'T恤';
var spm2 = '网球鞋';
var spm3 = '网球拍';
//单价
var dj1 = 245;
var dj2 = 570;
var dj3 = 320;
//数量
var sl1 = 2;
var sl2 = 1;
var sl3 = 1;
//折扣
var dis = 0.8;
//计算金额
var je1 = dj1 * sl1;
var je2 = dj2 * sl2;
var je3 = dj3 * sl3;
//总金额
var zje = (je1 + je2 + je3) * dis;
//缴费
var sjjf = 1500;
//找钱
var zq = sjjf - zje;
//积分
var jf = parseInt(zje / 100 * 3);

console.log(" ************消费单************ ");
console.log(' 购买物品\t单价\t数量\t金额' );
console.log(` ${spm1} \t\t￥${dj1}\t\t${sl1}\t￥${je1}`);
console.log(` ${spm2} \t\t￥${dj2}\t\t${sl2}\t￥${je2}`);
console.log(` ${spm3} \t\t￥${dj3}\t\t${sl3}\t￥${je3}`);
console.log(' \n');
console.log(' 折扣：' + dis*10+'折');
console.log(' 消费总金额：￥' + zje);
console.log(' 实际缴费：￥' + sjjf);
console.log(' 找钱：￥' + zq);
console.log(' 本次购物所获得积分：' + jf);







